package cn.enited.devtools.apiaggregator.config;

import cn.enited.devtools.apiaggregator.exception.DefaultLockExceptionHandler;
import cn.enited.devtools.apiaggregator.exception.ExceptionHandler;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class LockConfig {

    @Bean
    @ConditionalOnMissingBean(ExceptionHandler.class)
    public ExceptionHandler defaultLockExceptionHandler() {
        return new DefaultLockExceptionHandler();
    }
}
